//
//  Constants.h
//  NEWMOHO
//
//  Created by rimi on 2017/8/15.
//  Copyright © 2017年 yangkai. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@class TagModel,ShareModel;
@interface Constants : NSObject

+(void)showAAlertMessage:(NSString *)msg title:(NSString *)title buttonTexts:(NSArray *)arrTexts buttonAction:(void (^)(int buttonIndex))buttonAction;
/**
 判断字符是否为空
 */
+(BOOL)isTextEmpty:(NSString *)str;
/**
 计算字符（包含中文）
 */
+ (NSUInteger)textLength: (NSString *) text;

/**
 截取字符串
 
 @param index 截取最大字节数
 @param text 需要截取的字符串
 */
+ (NSString *)subStringByByteWithIndex:(NSInteger)index contentText:(NSString *)text;

/**
 字典转Json字符串
 
 @param infoDict 字典
 */
+ (NSString*)convertToJSONData:(id)infoDict;

+ (UIImage*)sacleImage:(UIImage*)tmpImage;

+ (UIFont*)readIconFontWithSize:(CGFloat)size;

+(NSString *)md5:(NSString *)inPutText;

+(NSString *)md5Douho:(NSString *)inPutText;

+ (NSString *)createSignatureWithParam:(NSDictionary*)param;

+ (UIViewController *)keyController;

+ (NSString *)appVersion;


+ (void)addAnimationToButton:(UIView*)view
                    withType:(NSInteger)type
                 forSelected:(BOOL)isSelected;

+ (void)showLoginController:(BOOL)isForBidding;

+ (void)showPhotoBroswerWithSourceImageViews:(NSArray*)sourceImageViews
                                     andimageUrls:(NSArray*)imageUrls
                                     atIndex:(NSInteger)index;

+ (void)showTagSubjectsControllerWithModel:(TagModel*)model;

+ (NSString*)readDeviceId;

+ (NSString*)readSignature;

+ (BOOL)haveBangHair;

+ (void)showSubjectReportWithId:(NSInteger)InfoId
                      andUserId:(NSInteger)userId;

+ (CAGradientLayer *)setGradualChangingColor:(UIView *)view
                                   fromColor:(UIColor *)fromColor
                                     toColor:(UIColor *)toColor;

+ (void)shareApp;

+ (void)shareWithModel:(ShareModel*)model;
@end
